<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/jquery-3.3.1.min.js"></script>
</head>
<body>
    <!-- 小图 -->
<div style="background-color:red;border: dotted; height: 50px; width: 50px">
    <img src="img/1.jpg" id="small" style="width: 50px; height: 50px;">
</div>
<!-- 大图 -->
<div style="border: double ;width: 400px; height: 400px; position: absolute; left: 500px; top:10px">
    <img src="" id="big" style="width: 400px; height: 400px; display:none;">
</div>
    <!-- 开始和结束按钮 -->
<input id="startBtn" type="button" style="width: 150px;height: 150px; font-size: 20px" value="开始">
<input id="stopBtn" type="button" style="width: 150px;height: 150px; font-size: 20px" value="停止">

    <script>
        let arr =["img/1.jpg","img/2.jpg","img/3.jpg","img/4.jpg","img/5.jpg","img/6.jpg"];
       //定义计数器
        let count =0;
        //计时器对象
        let time=null;
        //定义图片路径变量
        let img ="";
        $(function(){
            $("#startBtn").on('click',function(){
                $("#startBtn").prop('disabled',true);
                $("#stopBtn").prop('disabled',false);
            time = setInterval(function(){
                 let con = count % arr.length;
                 img= arr[con];
                 $("#small").prop("src",img);
                 count++;
                },10)
            })
            $("#stopBtn").on('click',function(){
                clearInterval(time);
                $("#startBtn").prop('disabled',false);
                $("#stopBtn").prop('disabled',true);
                $("#big").prop("src",img);
                $("#big").prop("style","width:400px; height:400px;");

            })
        })
         
    </script>
</body>
</html>